package com.tom.org.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.tom.basic.domain.BaseDomain;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain {

    private String sn;
    private String name;
    private String dirPath;
    private Integer state;
    private Long manager_id;
    private Long parent_id;
    // 部门经理
    private Employee manager;
    // 部门上一级
    private Department parent;
    @JsonInclude(JsonInclude.Include.NON_EMPTY) // 当数据不为空的时候才返回
    private List<Department> children = new ArrayList<>();
}
